<?php
namespace app\mapi\model;
use think\Model;

/**
 * 商品轮播模型类
 * @author  黄明杰 vx:HMJ125855
 * @version 20190201
 */
class MallImageModel extends Model
{

    protected $name = 'MallImage';

    /**
     * 数据所有方法
     * @param   Array   $Where  查询条件
     * @param   String  $Field  查询字段
     * @param   Srting  $Order  查询排序
     * @return  Array
     */
    public function mAll($Where = [], $Field = '*', $Limit = 5, $Order = 'image_sort DESC'){
        $Where['image_state'] = 1;
        $Where['image_del'] = 1;

        $Lists = $this->field($Field)->where($Where)->order($Order)->limit($Limit)->select();

        return ObjectToArray($Lists);
    }

}